<template>
	<!-- 专家详情 -->
	<view class="">
		<view class="player-bar">
			<view class="player-bar-top"></view>
			
			<view class="player-bar-circle2">
				<image class="player-bar-circle3" :src="form.avatar" mode="widthFix"></image>
			</view>
			<!-- <view class="player-bar-circle2" :style="'background:rgb(230,230,200) url('+form.avatar+') no-repeat center center;background-size:400rpx;transform: skew(5deg);'"></view> -->
			<!-- <image class="player-bar-circle2" :src="form.avatar" mode=""></image> -->
			<view class="player-bar-circle"></view>
			<view class="title">{{form.nickname}}</view>
			<!-- <view class="job">{{form.job}}</view> -->
		</view>
		<view class="item-content">
			<view class="item-line-content">{{form.job}}</view>
			<view class="item-line-content">擅长{{form.field}}</view>
			<view class="item-text-content">{{form.comment}}</view>
		</view>
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				id: '',
				
				form: {
					avatar: '',
					nickname: '',
					job: '',
					field: '',
					comment: '',
				},
			}
		},
		onLoad(options) {
			this.id = options.id
			if(this.id){
				this.initPage();
			}
		},
		methods: {
			initPage(){
				// #ifdef H5
				this.$nextTick(function() {
				// #endif
					this.getData();
				// #ifdef H5
				})
				// #endif
			},
			// 专家详情
			getData(){
				vk.callFunction({
						url: this.$api.EmployeeInfo,
						loading: true,
						data: {
							_id: this.id
						},
					})
					.then(res => {
						this.form = res.item
					})
			},
		}
	}
</script>

<style scoped lang="scss">
	.content{
		margin: 0 auto 24rpx;
		font-size: 14px;
		/* letter-spacing: 1px;
		text-indent: 2em; */
	}
	img{
		width: 100%;
	}
	.player-bar {
		position: relative;
		width: 100%;
		height: 580rpx;
		
		.player-bar-top{
			position: absolute;
			top: 2rpx;
			left: 0;
			right: 0;
			margin: auto;
			width: 98%;
			height: 300rpx;
			// background-image: linear-gradient(90deg, rgb(220, 180, 120), rgb(190, 100, 80));
			background-image: linear-gradient(90deg, #50AFDC, #3C7DC8);
		}
		.player-bar-circle{
			position: absolute;
			top: 100rpx;
			left: 0;
			right: 0;
			margin: auto;
			width: 400rpx;
			height: 400rpx;
			background: transparent;
			border: 10rpx solid #ddd;
			border-radius: 50%;
			box-shadow: 0px 0px 25px 0px #333;
			// transform: skew(-5deg);
		}
		.player-bar-circle2{
			overflow: hidden;
			position: absolute;
			top: 130rpx;
			left: 0;
			right: 0;
			margin: auto;
			width: 320rpx;
			height: 340rpx;
			border-radius: 50%;
			// filter: blur(1px);
			// transform: skew(-5deg);
		}
		.player-bar-circle3{
			position: absolute;
			top: -30rpx;
			left: -30rpx;
			right: 0;
			margin: auto;
			width: 380rpx;
			// height: 380rpx;
			// border-radius: 50%;
			// filter: blur(1px);
			// transform: skew(5deg);
		}
		.title{
			position: absolute;
			top: 20rpx;
			left: 0;
			right: 0;
			margin: auto;
			color: #fff;
			font-size: 16px;
			text-align: center;
		}
		.job{
			position: absolute;
			top: 540rpx;
			left: 0;
			right: 0;
			margin: auto;
			padding: 20rpx 20rpx;
			width: 65%;
			background-color: #3C7DC8;
			color: #fff;
			font-size: 16px;
			text-align: center;
		}
	}
	.item-content{
		margin: auto;
		padding: 20rpx 50rpx 40rpx;
		width: 80%;
		border: 5px solid #3C7DC8;
		border-radius: 10px 10px 0 0;
	}
	.item-line-content{
		margin-bottom: 20rpx;
		padding: 20rpx 0rpx;
		width: 100%;
		background-color: #3C7DC8;
		color: #fff;
		font-size: 16px;
		text-align: center;
	}
	.item-text-content{
		margin: 20rpx 0;
		width: 100%;
		color: #333;
		font-size: 14px;
	}
</style>